package com.ymatou.paymentproxy.service;

import org.json.JSONObject;

import com.ymt.base.YmatouBaseCall;
import com.ymttest.utils.EnvSetup;
/**
*退款申请审核通过Call
*FreeMaker Template自动生成代码
*/
public class ApproveRefundCall extends YmatouBaseCall{
	private static String opurl ="api/Refund/ApproveRefund";
	
	public ApproveRefundCall() {
		super(EnvSetup.getSystemUrl("paymentproxy"),opurl,"POST","JSON");
	}
	@Override
	public void addDefHeader() {
		client.addHeader("Accept","text/xml,text/javascript,text/html,application/json");
		client.addHeader("Content-Type", "application/json; charset=UTF-8");
	}
	/**
	 * 获取okflag
	 * 
	 * @return
	 */
	public Boolean getOkflag() {
		Boolean okflag = null;
		try {
			okflag = new JSONObject(getReturnData()).getJSONObject("Details").getBoolean("OkFlag");
		} catch (Exception e) {
			e.printStackTrace();
		}
		return okflag;
	}
}